package cn.edu.sjtu.se.dslab.service;

import java.util.List;

import cn.edu.sjtu.se.dslab.action.bean.PageBean;
import cn.edu.sjtu.se.dslab.component.data.DataComponent;
import cn.edu.sjtu.se.dslab.exception.DBException;

public interface IDataComponentService {

	public boolean addDataComponent(DataComponent component);

	public DataComponent getDataComponentById(long id);

	public DataComponent getDataComponentByUri(String uri);
	
	/**
	 * 获取所有的DataComponent（DataComponent含有对应的DataEntity-->类型为DomainEntity）
	 * @return List<DataComponent>
	 */
	public List<DataComponent> getAllDataComponentList();

	public boolean updateDataComponent(DataComponent component);

	/**
	 * 以分页的形式获取所有的DataComponent（DataComponent含有对应的DataEntity-->类型为DomainEntity）
	 * @return PageBean<DataComponent>
	 */
	public PageBean<DataComponent> getPageBean(int pageNo) throws DBException;

}
